/**
 * 
 */
package org.o14x.alpha.ui.views.folder.columns;

import java.io.File;

import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;

/**
 * The natypeme column.
 * 
 * @author Olivier DANGREAUX
 */
public class TypeColumnHelper extends ColumnHelper {
	/* (non-Javadoc)
	 * @see org.o14x.alpha.ui.views.folder.columns.ColumnHelper#createTableColumn(org.eclipse.swt.widgets.Table, org.eclipse.swt.widgets.Listener)
	 */
	@Override
	public TableColumn createTableColumn(Table parent, Listener listener) {
		TableColumn tableColumn = super.createTableColumn(parent, listener);
		return tableColumn;
	}

	@Override
	public int compare(File file1, File file2) {
		return getUiController().getServices().getFileServices().getFileType(file1).compareTo(getUiController().getServices().getFileServices().getFileType(file2));
	}

	@Override
	public Image getColumnImage(File file) {
		return null;
	}

	@Override
	public String getColumnText(File file) {
		return getUiController().getServices().getFileServices().getFileType(file);
	}

	@Override
	public String getTitle() {
		return "Type";
	}
}
